package com.gkj.converters;

import com.gkj.blog.business.enums.ArticleStatusEnum;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

public class String2ArticleStatutsEnum implements Converter<String,ArticleStatusEnum> {

    @Override
    public ArticleStatusEnum convert(String source) {
        return ArticleStatusEnum.get(Integer.parseInt(source));
    }
}
